/* ************************************************************************

   Copyright:

   License:

   Authors: SALMON Charles

************************************************************************ */

qx.Class.define("bip.services.Questions",
{
  extend : bip.services.AbstractService,
  
  construct : function()
  {
    this.base(arguments);
    this._store.bind("model", this, "questions");
  },
  
  properties : {
    questions : {
      nullable: true,
      event: "changeQuestions"
    }
  },
  
  members :
  {
    
    fetchQuestions : function(topic) {
    	this._store.setUrl(null);
    	this._store.setPostModel(topic);
    	this._store.setUrl("questions/getQuestionsOfTopic");
    }
  }
});